Skip to content

IEP-1795 ESP-IDF Manager only displays major and minor version number of installed ESP-IDF Version (IDE version 4.x)#1490

Open
sigmaaa wants to merge 2 commits into
masterfrom
IEP-1795
Open

IEP-1795 ESP-IDF Manager only displays major and minor version number of installed ESP-IDF Version (IDE version 4.x)#1490
sigmaaa wants to merge 2 commits into
masterfrom
IEP-1795

Conversation

@sigmaaa

@sigmaaa sigmaaa commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Description

Parsing the version from the version.cmake from the esp-idf folder instead using activation script. The activation script provides only major and minor now - espressif/idf-im-ui#868.

#1422

Fixes # (IEP-1795)

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How has this been tested?

ensure that tyhe esp-idf version column now has a major.minor.patch format:
image

Test Configuration:

  • ESP-IDF Version:
  • OS (Windows,Linux and macOS):

Dependent components impacted by this PR:

  • Component 1
  • Component 2

Checklist

  • PR Self Reviewed
  • Applied Code formatting
  • Added Documentation
  • Added Unit Test
  • Verified on all platforms - Windows,Linux and macOS

Summary by CodeRabbit

  • Bug Fixes

    • Improved ESP-IDF version detection by first reading the installed CMake version file, with graceful fallback to the activation-script output when CMake detection fails.
    • Version parsing now supports formats with or without patch numbers and returns safe results when version data is missing or invalid.
  • Tests

    • Added unit test coverage for parsing full/partial version entries and handling null, missing, or malformed version configuration files.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 84f8044f-bfe4-489e-8b52-2b8249ed455e

📥 Commits

Reviewing files that changed from the base of the PR and between 2cff560 and 679b4a8.

📒 Files selected for processing (1)
  • bundles/com.espressif.idf.core/src/com/espressif/idf/core/tools/util/ToolsUtility.java
🚧 Files skipped from review as they are similar to previous changes (1)
  • bundles/com.espressif.idf.core/src/com/espressif/idf/core/tools/util/ToolsUtility.java

📝 Walkthrough

Walkthrough

ToolsUtility now checks tools/cmake/version.cmake for ESP-IDF versions before using activation-script output. A public parser and JUnit tests cover complete, partial, missing, and null inputs.

Changes

ESP-IDF version detection

Layer / File(s) Summary
CMake version parser and detection flow
bundles/com.espressif.idf.core/.../ToolsUtility.java
Adds CMake version parsing and makes getIdfVersion prefer MAJOR.MINOR[.PATCH] values from version.cmake, with activation-script fallback.
Parser test coverage
tests/com.espressif.idf.core.test/.../ToolsUtilityTest.java
Tests complete and partial versions, missing files, null paths, and temporary CMake-file creation.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Installation
  participant ToolsUtility
  participant version.cmake
  participant ActivationScript
  Installation->>ToolsUtility: getIdfVersion
  ToolsUtility->>version.cmake: parse version definitions
  version.cmake-->>ToolsUtility: major.minor[.patch]
  ToolsUtility->>ActivationScript: fallback ESP_IDF_VERSION lookup
  ActivationScript-->>ToolsUtility: version output
Loading

Possibly related PRs

Suggested reviewers: kolipakakondal, andriifilippov, alirana01

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is directly related to the change: fixing ESP-IDF version display by addressing major/minor-only detection.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch IEP-1795

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@bundles/com.espressif.idf.core/src/com/espressif/idf/core/tools/util/ToolsUtility.java`:
- Around line 58-67: Update readIdfVersionFromCMake to wrap Path.of and
parseVersionCMake in an InvalidPathException catch, returning the existing
fallback value that triggers activation-script lookup when the user-provided
idfPath is malformed. Preserve the current empty-path handling and normal
parsing behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cab97f3a-1dcb-486d-ae10-f87018fec255

📥 Commits

Reviewing files that changed from the base of the PR and between 3504879 and 2cff560.

📒 Files selected for processing (2)
  • bundles/com.espressif.idf.core/src/com/espressif/idf/core/tools/util/ToolsUtility.java
  • tests/com.espressif.idf.core.test/src/com/espressif/idf/core/tools/test/ToolsUtilityTest.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant